feat: Store images in ssm. Copy tags. - #105
Open
yngvark wants to merge 4 commits into
Open
Conversation
yngvark
force-pushed
the
store_images_in_ssm
branch
from
April 11, 2025 07:38
4fd263f to
6c13740
Compare
yngvark
marked this pull request as ready for review
April 11, 2025 07:47
There was a problem hiding this comment.
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
ecs-update-and-deploy-task-definition/action.yml:181
- Using jq without compact formatting might produce JSON output with unnecessary whitespace or newlines that could cause issues when stored as an SSM parameter. Consider using jq with the -c flag to generate compact JSON.
MERGED_IMAGES=$(echo "$CURRENT_IMAGES" | jq --argjson new "$DEPLOYED_IMAGES" '. + $new')
Comment on lines
+176
to
+178
| --output text) | ||
| echo "Current images from SSM: (These are all images stored for this task definition, before deploying.)" | ||
| echo $CURRENT_IMAGES | jq |
There was a problem hiding this comment.
The command does not handle cases where the SSM parameter does not exist, which could cause the script to fail. Consider adding error handling or providing a default value for CURRENT_IMAGES if the parameter is missing.
Suggested change
| --output text) | |
| echo "Current images from SSM: (These are all images stored for this task definition, before deploying.)" | |
| echo $CURRENT_IMAGES | jq | |
| --output text 2>/dev/null || echo "[]") | |
| if [ "$CURRENT_IMAGES" == "[]" ]; then | |
| echo "SSM parameter '$SSM_PARAMETER_NAME' does not exist or is empty. Using default value: []" | |
| else | |
| echo "Current images from SSM: (These are all images stored for this task definition, before deploying.)" | |
| echo $CURRENT_IMAGES | jq | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Motivation and Context
Support Terraform deployment that reads the current image from SSM: https://github.com/oslokommune/pirates-iac/blob/672791bfebb05b6d16c5e00436dace27e65b8d5e/stacks/dev/app-too-tikki/_gp_ssm_container_images.tf